import request from "@/utils/request";

/***
 * 搜索为空的时候，先调用“保存关键词”接口
 * 保存关键词
 */
export const saveSearchkey = props => {
  return request({
    url: "/mall/product/search/feedback/add",
    method: "post",
    data: props
  });
};

// 关键词为空时，提交反馈
export const emptySubmit = props => {
  return request({
    url: "/mall/product/search/feedback/commit",
    method: "post",
    data: props
  });
};

//分页商品查询
export const getProducts = props => {
  return request({
    url: "/mall/shopHome/page",
    method: "post",
    data: props
  });
};
//筛选属性列表
export const queryStastsList = props => {
  return request({
    url: "/mall/shopHome/queryStastsList",
    method: "post",
    data: props
  });
};
//图片打标-传入图片可访问的地址，返回解析出来的关键词，后续可使用该关键词进行商品查询
export const imgMarking = props => {
  return request({
    url: "/mall/admin/image/marking",
    method: "post",
    data: props
  });
};
